module ArtistsHelper

  def artist_tab(name, divid, status)
    "<li class=\"#{status}\"> #{ link_to_function name, artist_show_pane(name, divid) }"
  end

  def artist_show_pane(name, divid)
    panes = %w{ bio-pane discog-pane song-pane forum-pane bands-members-pane review-pane }

    js_function = "" 

    panes.each do |pane|
      if pane == divid
        js_function << "$('#{pane}').show();"
      else
        js_function << "$('#{pane}').hide();"
      end
    end

    return js_function
  end

end
